<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<h3>人的对象 : firsttname 姓、lastnaem名、age、年龄 fullName1()方法</h3>
		<h3></h3>
		<script>
			var person={
				firsttname:"陈",
				lastnaem:"强",
				age:18,
				fullName1:function(){
					//函数里不能直接访问对象属性，假this
					return this.firsttname +this.lastnaem;
				}
			}
			console.log(person);
			console.log(person.firsttname);
			console.log(person.fullName1());
			//动态添加
			person.address ="废都西安";
			person.fullName2(){
				return person.firsttname+person.lastnaem+","+person.age;
			}
			console(person)
			console(person.fullName2());
		</script>
	</body>
	
</html>
